package action;

import java.util.List;

import model.Experience;
import model.User;
import action.base.BaseAction;

import com.opensymphony.xwork2.ActionContext;

public class SelfGetExperience extends BaseAction {
	private User user;
	private Experience experience;
	public Experience getExperience() {
		return experience;
	}
	public void setExperience(Experience experience) {
		this.experience = experience;
	}
	public String execute() throws Exception{
		ActionContext ctx = ActionContext.getContext();
		user = (User)ctx.getSession().get("USER");
		List<Experience> ex = mgex.getExperienceByUser(user);
		if(ex.size()>0){
			ctx.getSession().put("EX", ex);
			System.out.print(ex.size());
			System.out.println("aaaaaaaaaaaaaa");
			return "input";
		}else{
			return "input";
		}
	}
}
